<template>
    <div id="p_indexTech">
            <group>
                <swiper style="height:130px;" loop :list="topBanner" dots-position="center" :show-desc-mask="topbanMask">
                </swiper>                

            <!-- <tab :line-width="0" v-model="timeindex">
                    <tab-item>视频</tab-item>
                    <tab-item >音频</tab-item>
                </tab> -->
                
                <panel v-show="timeindex==0" class="video" :list="list" :type="type"></panel>
                <!-- <panel v-if="timeindex==1" class="audio" :list="list" :type="type"></panel> -->
            </group>        
    </div>
</template>
<script>
import moment from "moment";

import api from '../../api';

import {
    mapState,
    mapActions
} from 'vuex'

const baseList = [
    {
        url: 'company?id=1',
        img: '/static/z39h5/img/top1.jpg',
        title: ''
    }, {
        url: 'company?id=2',
        img: '/static/z39h5/img/top2.jpg',
        title: ''
    }];
    const proBarList = [{
        url: '',
        img: '/static/images/vote2.jpg',
        title: ''
    }];

import {
    Tab,
    TabItem,
    TransferDomDirective as TransferDom,
    Toast,
    Swipeout,
    SwipeoutItem,
    SwipeoutButton,
    XButton,
    PopupPicker,
    Group,
    Picker,
    Cell,
    Swiper,
    SwiperItem,Panel, Grid, GridItem, GroupTitle,
    Sticky
} from 'vux'

export default {
    directives: {
        TransferDom
    },
    components: {
    Tab,
    TabItem,
        Toast,
        Swipeout,
        SwipeoutItem,
        SwipeoutButton,
        XButton,
    PopupPicker,
    Group,
    Picker,
        Cell,
    Swiper,
    SwiperItem,Panel, Grid, GridItem, GroupTitle,
    Sticky
    },
    computed: {
        ...mapState({
            uid: state => state.vux.uid
        })
    },
    watch: {
        
    },
    created() {
        
    },
    mounted: function() {
        
    },
    methods: {     
        handleEvents(type) {
            if (type == 'on-open') {
                this.swipeOpen = true;
            } else {
                this.swipeOpen = false;
            }
            console.log('event: ', type)
        },
        getData: function() {
            
        },
        ...mapActions([
            
        ])
    },
    data() {
        return {
            type: '5',
            list: [{
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题一',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: '/component/cell'
              },{
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题一',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: '/component/cell'
              },{
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题一',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: '/component/cell'
              },{
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题一',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: '/component/cell'
              },{
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题一',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: '/component/cell'
              },{
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题一',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: '/component/cell'
              }, {
                src: 'https://cdns.7dtime.com/z39/ffffff.jpg',
                title: '标题二',
                desc: '由各种物质组成的巨型球状天体，叫做星球。星球有一定的形状，有自己的运行轨道。',
                url: {
                  path: '/component/radio',
                  replace: false
                },
                meta: {
                  source: '来源信息',
                  date: '时间',
                  other: '其他信息'
                }
              }],
              footer: {
                title: '查看更多',
                url: 'http://vux.li'
              },
            topBanner: baseList, //首页图片banner
            topbanMask:false,
              showPopupPicker: false,
              value5: ['2'],
            timeindex: 0,
            guideHeight: "500px",
            mdcontent:'',
            data: {
                session: {}
            }
            
        }
    }
}

</script>
<style scoped>

</style>
<style>

#p_indexTech .weui-panel {
    margin-top: 4px;
}

#p_indexTech .weui-search-bar:before {
    height: 0;
    border-top: 0;
}

#p_indexTech .video  .weui-media-box__hd{
    width: 120px;
    height: 80px; 
}
#p_indexTech .video .weui-media-box{
    padding: 8px;
}

</style>
